package com.greate.community.entity;

import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Mapping;

import java.util.Date;

/**
 * 讨论贴
 * 对应数据库表 `discuss_post`
 */
@Data
@ToString
@Document(indexName = "discuss-post-#{@appConfig.env}")
@Mapping(mappingPath = "mapping/discusspost-mapping.json")
public class DiscussPost {

    @Id
    private int id;

    private int userId; // 发表用户

    private String title;

    private String content;

    private String picUrls;

    private int type;

    private int status;

    private int viewCount;

    private int likeCount;

    private int commentCount;

    private double score;

    private Date createTime;
}
